﻿using SharpDepend.Classes;
using SharpDepend.Shared;
using SharpDepend.WP8.Renderer;
using System.Linq;

namespace SharpDepend.WP8
{
    public static class Manager
    {
        /// <summary>
        /// Initialize Windows Desktop implementation of SharpDepend classes.
        /// </summary>
        public static void Init()
        {
            SharpDepend.Manager.Registrate(
                new ClientManager(),
                null,
                new MulticastManager(),
                new ThreadManager(),
                new AESSecurityManager(),
                new GUITimerManager(),
                new FileManager(),
                null,
                null,
                new GraphicsDisplayManager(),
                new KeyboardManager(),
                new CameraManager(),
                new OriginalStopwatch(),
                new EnviromentStatisticsManager());

            SharpDepend.Manager.GraphicsDisplayManager.AddDevice(new GraphicDevice(typeof(SoftwareRenderer), "Software"));
            SharpDepend.Manager.GraphicsDisplayManager.AddDevice(new GraphicDevice(typeof(DirectXRenderer), "DirectX"));

            // Set first graphics device as default.
            SharpDepend.Manager.GraphicsDisplayManager.SetGraphicsDevice(
                SharpDepend.Manager.GraphicsDisplayManager.AvailableDevices.ElementAt(1));
        }
    }
}
